/*
 * InvestmentTransactionDetail.java
 *
 *  
 */
package org.msb.finance.data;

import java.math.BigDecimal;

/**
 * 
 * 
 * @author Marc Boudreau
 * 
 */
public class InvestmentTransactionDetail extends TransactionDetail {

	/*
	 * 
	 */
	private BigDecimal price;

	/*
	 * 
	 */
	private BigDecimal quantity;

	/*
	 * 
	 */
	private BigDecimal commission;

	/*
	 * 
	 */
	private Investment investment;

	/*
	 * 
	 */
	private InvestmentAction action;

	/*
	 * (non-Javadoc)
	 * 
	 * @see org.msb.finance.data.TransactionDetail#getAmount()
	 */
	@Override
	public BigDecimal getAmount() {
		return price.multiply(quantity).subtract(commission);
	}

	/**
	 * 
	 * @return
	 */
	public BigDecimal getPrice() {
		return price;
	}

	/**
	 * 
	 * @return
	 */
	public BigDecimal getQuantity() {
		return quantity;
	}

	/**
	 * 
	 * @return
	 */
	public BigDecimal getCommission() {
		return commission;
	}

	/**
	 * 
	 * @return
	 */
	public Investment getInvestment() {
		return investment;
	}

	/**
	 * 
	 * @return
	 */
	public InvestmentAction getAction() {
		return action;
	}
}
